package senior.threadExer;

import java.util.Scanner;

/**
 * @author shkstart
 * @creat 2022-05-13:55
 */
public class LoginTest extends Thread {
    @Override
    public void run() {
        try {
            sleep(40000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("超时");
        System.exit(0);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        LoginTest thread = new LoginTest();
        thread.start();
        String user = "admin";
        String pwd = "admin";
        System.out.println("输入用户名：");
        String user1 = sc.next();
        System.out.println("输入密码：");
        String pwd1 = sc.next();
        if (user1.equals(user) && pwd1.equals(pwd)) {
            System.out.println("Welcome to paoyouzhijia!!!");
        }

    }
}
